package MyOop03;

import LianXi02.Role;

public class RoleProTest {
    public static void main(String[] args) {
        RolePro r3 = new RolePro("乔峰",100,'男');
        RolePro r4 = new RolePro("鸠摩智",100,'男');
        //展示角色
        r3.showRoleInfo();
        r4.showRoleInfo();
        //r1攻击r2
        while (true){
            r3.attackpro(r4);
            if (r4.getBlood()==0){
                System.out.println(r3.getName()+"k.o了"+r4.getName());
                break;
            }
            r4.attackpro(r3);
            if (r3.getBlood()==0){
                System.out.println(r4.getName()+"k.o了"+r3.getName());
                break;
            }
        }
    }
}
